﻿using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using System.Collections.Generic;
using System.Collections;
using Android.Util;
using StoveTop.Models;

namespace StoveTop
{
	[Activity (Label = "StoveTop", MainLauncher = true)]
	public class HomeScreen : Activity
	{

		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.Main);

			// Get our button from the layout resource,
			// and attach an event to it
			Button recipeButton = FindViewById<Button> (Resource.Id.recipeList);
			Button shoppingListButton = FindViewById<Button> (Resource.Id.shoppingList);
			Button inventoryButton = FindViewById<Button> (Resource.Id.inventory);

			recipeButton.Click += delegate {
				var recipeList = new Intent (this, typeof(RecipeListScreen));
				StartActivity (recipeList);

			};

			shoppingListButton.Click += delegate {
				var shoppingList = new Intent(this, typeof(ShoppingListScreen));
				StartActivity(shoppingList);
			};

			inventoryButton.Click += delegate {
				var inventory = new Intent (this, typeof(InventoryScreen));
				StartActivity (inventory);
			};
			var seed = new Intent (this, typeof(SeedDatabase));
			StartActivity (seed);
		}
	}
}


